<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<style type="text/css">
		*{
			margin: 0px;
			padding: 0px;
            background-image: url(img/11.jpeg);
		}
		#container{
			width: 100%;
			height: 600px;
			display: flex;
			justify-content: center;
			align-items: center;
			background-color: #00FFFF;
		}
		#midlerDiv{
			width: 600px;
			height: 500px;
			display: flex;
			align-items: center;
			overflow: hidden;
		}
		#imgtwo{
			display: flex;
			width: 1600px;
			height: 100px;
		}
		#imgtwo img{
			width: 100px;
			height: 100px;
		}
	</style>
	<body>
		<div id="container">
			<div id="midlerDiv">
				<div id="imgtwo" onmouseenter="mouseEnterAction();" onmouseleave="mouseLeaveAction();">
					<img src="img/1.jpeg" >
					<img src="img/2.jpeg" >
					<img src="img/3.jpeg" >
					<img src="img/4.jpeg" >
					<img src="img/5.jpeg" >
					<img src="img/6.jpeg" >
					<img src="img/7.jpeg" >
					<img src="img/8.jpeg" >
					<img src="img/9.jpeg" >
					<img src="img/10.jpeg" >
					<img src="img/11.jpeg" >
					<img src="img/1.jpeg" >
					<img src="img/2.jpeg" >
					<img src="img/3.jpeg" >
					<img src="img/4.jpeg" >
					<img src="img/5.jpeg" >
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		var imgtwoObj = document.getElementById('imgtwo');
		var marginLeft = 0;
		var myInterval = null;
		
		function imgAction(){
			marginLeft--;
			imgtwoObj.style.marginLeft= marginLeft+'px';
			if(marginLeft==-1000){
				marginLeft=0;
			}
			if(marginLeft%100==0){
			clearInterval(myInterval);
			setTimeout(function(){
				myInterval = setInterval(imgAction,10);
			},1000);
			}
		}
		function mouseEnterAction(){
			 clearInterval(myInterval);
		}
		function mouseLeaveAction(){
			myInterval = setInterval(imgAction,10)
		}
		onload = function(){
			myInterval = setInterval(imgAction,10)
		}
	</script>
</html>
